<?php

class MyIterator implements Iterator
{
    private $arr = [];

    public function __construct($arr)
    {
        if (is_array($arr)) {
            $this->arr = $arr;
        }
    }



}